/**
 * @file e2_t2_q5.c
 * @date 2022-03-04
 * 
 * @copyright Copyright (c) 2022 cnzyx MIT Licence
 * 
 */

#include<stdio.h>
#include<stdlib.h>

long long factorial(int max){
    long long result=1;
    for(int i=1;i<=max;i++){
        result*=i;
    }
    return result;
}

int fun(int max,double *array){
    int i=0;
    for(;i<=max/2;i++){
        array[i]=factorial(2*i+1);
    }
    return i;
}

int main(int argc, char const *argv[])
{
    //UTF-8
    system("chcp 65001");
    int in_num,cnt;
    double array[5];
    printf("请输入一个奇数：");
    scanf("%d,",&in_num);
    cnt=fun(in_num,array);
    printf("结果：");
    for(int i=0;i<cnt;i++){
        printf("%lf ",array[i]);
    }
    printf("\n");
    
    //Pause console
    system("pause");
    return 0;
}
